#ifndef TOKEN_HPP
#define TOKEN_HPP

#include <string>


class token
{
    public:
        token(uint_fast32_t u, std::string s)
        {
            token_type = u;
            token_value = s;
        }

        std::string get_string() { return token_value; }

        bool is_line_number() {return token_type == line_number;}
        bool is_command() {return token_type == command;}
        bool is_constant() {return token_type == constant;}
        bool is_literal() {return token_type == literal;}
        bool is_identifier() {return token_type == identifier;}
        bool is_operator() {return token_type == op;}
        bool is_parenthesis() {return token_type == paren;}
        bool is_comma() {return token_type == comma;}
        bool is_semicolon() {return token_type == semicolon;}
        bool is_end_of_line() {return token_type == end_of_line;}
        bool is_end_of_file() {return token_type == end_of_file;}

        static const uint_fast32_t line_number = 1;
        static const uint_fast32_t command = 2;
        static const uint_fast32_t constant = 3; //note: stored as a string
        static const uint_fast32_t literal = 4; // note: the parser does not remove the quotation marks around the literal
        static const uint_fast32_t identifier = 5;
        static const uint_fast32_t op = 6;
        static const uint_fast32_t paren = 7; //note: whether "(" or ")" is stored in the token
        static const uint_fast32_t comma = 8;
        static const uint_fast32_t semicolon = 9;
        static const uint_fast32_t end_of_line = 10; // note: appended to end of each line
        static const uint_fast32_t end_of_file = 11; //note: appended to end of token vector/array/linked list

    private:
        uint_fast32_t token_type;
        std::string token_value;
};

#endif // TOKEN_HPP
